module hong{
    /** 显示元素 */
    export class cyxxItem extends egret.DisplayObjectContainer {
        /** 文本显示 */
        private tx:egret.TextField;
        /** 底框 */
        private bg:egret.Bitmap;

        public constructor(tv:string, h:number = 54, w:number = 54) {
            super();

            this.tx = new egret.TextField();
            this.tx.text = tv;
            this.bg = new egret.Bitmap();
            this.bg.texture = RES.getRes("ic_png");

            this.addChild(this.bg);
            this.tx.x = 10;
            this.tx.y = 10;
            this.tx.size = 48;
            this.tx.textColor = 0x90df90;
            this.tx.bold = true;
            this.addChild(this.tx);

            //this.scaleX = w / 188;
            //this.scaleY = h / 188;
        }

        /** 设置文字 */
        public set text(t:string) {
            this.tx.text = t;
        }
        /** 获取文字 */
        public get text() {
            return this.tx.text;
        }
    }
}